﻿
namespace CDV.IRMS.WebAPI.TaskExecution.Interface
{
    /// <summary>
    /// 缓存服务
    /// </summary>
    public interface ICacheService
    {
        /// <summary>
        /// 缓存锁定路由节点
        /// </summary>
        /// <param name="taskID">任务ID</param>
        /// <param name="routeID">路由ID</param>
        /// <param name="routeNodeID">路由节点ID</param>
        void AddLockedNode(int taskID, int routeID, string routeNodeID);

        /// <summary>
        /// 移除锁定路由节点的缓存
        /// </summary>
        /// <param name="taskID">任务ID</param>
        /// <param name="routeID">路由ID</param>
        /// <returns>-1:移除失败；否则为路由节点ID</returns>
        string RemoveLockedNode(int taskID, int routeID);
    }
}
